package ufrgs.inf.delphos.extraction.model;

import org.eclipse.jdt.core.IJavaElement;


public class DelphosSystemModelController {

	private DSystem delphosSystemModel = null;
	
	public DelphosSystemModelController() {
		// empty
	}
	
	public DelphosSystemModelController(DSystem delphosSystemModel) {

		this.delphosSystemModel = delphosSystemModel;
	}
	
	public DSystem getDelphosSystemModel() {
		
		if(this.delphosSystemModel == null)
			this.delphosSystemModel = DelphosSystemModelFactory.eINSTANCE.createDSystem();
		
		return this.delphosSystemModel;
	}
	
	/* CREATORS */
	
	public DSystem createDelphosSystemModel(String name) {
		
		if(this.delphosSystemModel == null)
			this.delphosSystemModel = DelphosSystemModelFactory.eINSTANCE.createDSystem();
		
		this.delphosSystemModel.setName(name);
		return this.delphosSystemModel;
	}
	
	public DCompilationUnit createCompilationUnit(IJavaElement javaElement) {
		
		
		DCompilationUnit compUnit = DelphosSystemModelFactory.eINSTANCE.createDCompilationUnit();
		
		
		return compUnit;
	}
	
	public DRelation createRelation(DRelationType type, DCompilationUnit compUnitSource, DCompilationUnit compUnitTarget) {
		
		
		DRelation relation = DelphosSystemModelFactory.eINSTANCE.createDRelation();
		
		
		
		
		return relation;
	}
	
}
